-
Notifications
You must be signed in to change notification settings - Fork 296
Add E2E tests for keyword routing (Issue #667) #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
b0dfb6a to
7d27e11
Compare
|
Hi @Xunzhuo , |
|
@srini-abhiram PTAL, thanks |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
e1a1311 to
6a09f09
Compare
Implement comprehensive end-to-end tests for keyword routing functionality to address Issue vllm-project#667. Test Coverage: - OR operator: any keyword matches - AND operator: all keywords must match - NOR operator: no keywords match - Case-sensitive vs case-insensitive matching - Regex pattern matching and special character handling - Word boundary detection - Edge cases: empty text, Unicode, emoji, punctuation - Multiple rule matching and priority - Confidence score validation - Error handling Implementation Details: - 35 comprehensive tests using Ginkgo v2 and Gomega - JSON test data files for maintainability (26 test cases) - Helper functions for test setup - Isolated NOR operator tests to prevent false matches - CI/CD integration with GitHub Actions workflow - Coverage measurement: 87.1% of keyword_classifier.go (exceeds 80% threshold) - Race condition detection - golangci-lint integration Technical Fixes: - Removed unused helper functions to pass linter - Disabled CUDA features for CI environment (--no-default-features) - Fixed coverage reporting to measure keyword_classifier.go specifically - Removed -run filter that doesn't work with Ginkgo tests Files Added: - .github/workflows/unit-test-e2e-testcases.yml - e2e-tests/testcases/suite_test.go - e2e-tests/testcases/keyword_routing_test.go - e2e-tests/testcases/helpers.go - e2e-tests/testcases/testdata/keyword_routing_cases.json - e2e-tests/testcases/go.mod - e2e-tests/testcases/go.sum Signed-off-by: Senan Zedan <[email protected]>
6a09f09 to
7672d1f
Compare
|
After sync the branch - fix back all the failing unit tests and squash all commits to one commit for easy code review. |
|
@szedan-rh i think the testcases is located incorrectly, plz move the cases into e2e/testcases, this will trigger the e2e tests in CI, plz read other testcases to understand how it works |
|
You Right, I put them under e2e-tests. |
|
There are some un unused types in |
|
@srini-abhiram - it's there because i will raise soon pr's for those test cases, wanted to do that one by one. seems forogt to remove them before raising this PR. |
|
@Xunzhuo / @srini-abhiram - Could you please take another look? |

Summary
This PR implements comprehensive end-to-end tests for keyword routing functionality, addressing Issue #667.
Test Coverage
35 Tests Covering:
Test Results
Performance:
Files Added
e2e-tests/testcases/suite_test.go: Ginkgo test suite entry pointe2e-tests/testcases/keyword_routing_test.go: 35 comprehensive testse2e-tests/testcases/helpers.go: Test helper functionse2e-tests/testcases/testdata/keyword_routing_cases.json: 26 JSON test casese2e-tests/testcases/go.mod&go.sum: Module configuration.github/workflows/unit-test-e2e-testcases.yml: CI/CD workflowTechnical Highlights
NOR Operator Isolation
Created dedicated classifier for NOR tests to prevent false matches in tests expecting empty results.
Test Framework
CI Integration
GitHub Actions workflow includes:
Checklist
Related Issues
Fixes #667
Signed-off-by: szedan